package Day2_2;

//快递类
public class Express {
    private String expressNuber;//快递单号
    private double goodsweight;//货物重量

    public String getExpressNuber() {
        return expressNuber;
    }

    public void setExpressNuber(String expressNuber) {
        this.expressNuber = expressNuber;
    }

    public double getGoodsweight() {
        return goodsweight;
    }

    public void setGoodsweight(double goodsweight) {
        this.goodsweight = goodsweight;
    }

    public Express(String expressNuber,double goodsweight){
        this.expressNuber=expressNuber;
        this.goodsweight=goodsweight;
    }

    //送货准备
    public void senBefore(){
        System.out.println("------订单开始处理，仓库准备出货--------");
        System.out.println("货物重量："+this.getGoodsweight()+"kg");
        System.out.println("货物检验完毕！");
        System.out.println("货物装车完毕！");
        System.out.println("运货人已通知！");
        System.out.println("快递单号："+this.getExpressNuber());
    }

    //送货途中
    public void sending(Truck t){//Truck t 创建货车类
        System.out.println(t.getTransporter()+"正在驾驶编号为"+
                            t.getNumber()+"的"+t.getModel()
                            +"运输货物！");
        t.transport();
        t.getPosition();
    }

    //货车保养
    public void sendAfter(Truck t){
        System.out.println("货物运输任务已完成！");
        System.out.println(t.getTransporter()+"所驾驶的编号为"
                            +t.getNumber()+"的"+t.getModel()
                            +"已归还！");
    }
}
